package com.ymatou.iapi.reachpromotion.parameter;

import java.lang.reflect.Field;


public class UserInfo {
	@Role("key")
	private Integer id;
	private String name;
	private boolean sex;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isSex() {
		return sex;
	}

	public void setSex(boolean sex) {
		this.sex = sex;
	}
	
	public static void main(String[] args) {
		UserInfo user1 = new UserInfo();
		
		user1.setId(1);
		user1.setName("testst1");
		user1.setSex(true);
		
		Field[] fields = user1.getClass().getDeclaredFields();
		
		for (Field field : fields) {
			System.out.println(field.getName()+":"+field.isAnnotationPresent(Role.class));
		}
	}
}
